// source --> https://rza.org/wp-content/plugins/simple-download-monitor/js/sdm_wp_scripts.js?ver=5.6.8 // Simple Download Monitor frontend scripts function sdm_is_ie() { var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { return true; } return false; } jQuery(document).ready(function ($) { // Populate all nested titles and links $('li.sdm_cat').each(function () { var $this = $(this); this_slug = $this.attr('id'); this_id = $this.children('.sdm_cat_title').attr('id'); // Run ajax $.post( sdm_ajax_script.ajaxurl, { action: 'sdm_pop_cats', cat_slug: this_slug, parent_id: this_id }, function (response) { // Loop array returned from ajax function $.each(response.final_array, function (key, value) { // Populate each matched post title and permalink $this.children('.sdm_placeholder').append('' + value['title'] + ''); }); $this.children('span').append(''); } ); }); // Hide results on page load $('li.sdm_cat').children('.sdm_placeholder').hide(); // Slide toggle for each list item $('body').on('click', '.sdm_cat_title', function (e) { // If there is any html.. then we have more elements if ($(this).next().html() != '') { $(this).next().slideToggle(); // toggle div titles } }); // Download buttons with terms or captcha has this class applied to it $('.sdm_download_with_condition').on('click', function (e) { e.preventDefault(); $(this).closest('form').trigger('submit'); }); // Check if terms checkbox is enabled. if ($('.sdm-termscond-checkbox').length) { $.each($('.sdm-termscond-checkbox'), function () { if (!$(this).is(':checked')) { var cur = $(this).children(':checkbox'); var btn = $(cur).closest('form').find('a.sdm_download,a.sdm_download_with_condition'); $(btn).addClass('sdm_disabled_button'); } }); $.each($('.sdm-download-form'), function () { var form = $(this); form.on('submit', function () { if ($('.agree_termscond', form).is(':checked')) { $('.sdm-termscond-checkbox', form).removeClass('sdm_general_error_msg'); return true; } else { $('.sdm-termscond-checkbox', form).addClass('sdm_general_error_msg'); } return false; }); }); $.each($('.agree_termscond'), function () { var element = $(this); var form = element.closest('form'); element.on('click', function () { if (element.is(':checked')) { $('.sdm_download_with_condition', form).removeClass('sdm_disabled_button'); $('.sdm-termscond-checkbox', form).removeClass('sdm_general_error_msg'); } else { $('.sdm_download_with_condition', form).addClass('sdm_disabled_button'); $('.sdm-termscond-checkbox', form).addClass('sdm_general_error_msg'); } }); }); } }); // source --> https://rza.org/wp-content/themes/Divi/core/admin/js/es6-promise.auto.min.js?ver=5.6.8 /** @license ES6-Promise v4.2.8 * es6-promise.auto.min.js * https://github.com/stefanpenner/es6-promise * * Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}function n(t){W=t}function r(t){z=t}function o(){return function(){return process.nextTick(a)}}function i(){return"undefined"!=typeof U?function(){U(a)}:c()}function s(){var t=0,e=new H(a),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function u(){var t=new MessageChannel;return t.port1.onmessage=a,function(){return t.port2.postMessage(0)}}function c(){var t=setTimeout;return function(){return t(a,1)}}function a(){for(var t=0;t